home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The X-Philes (2nd Revision)
/
The X-Philes Number 1 (1995).iso
/
xphiles
/
hp48hor2
/
stocdist.src
< prev
next >
Wrap
Text File
|
1992-01-11
|
2KB
|
59 lines
%%HP: T(3)A(D)F(.);
@ STOCDIST by Luca Radice
DIR
@ You must enter SigmaDAT before calculation.
\GSDAT 0
KMO
@ Computes the k-th moment about the origin.
\<< \-> k
\<< \GSDAT OBJ\-> DROP k ^ 1 N\GS 1 -
START SWAP k ^ +
NEXT N\GS /
\>>
\>>
KMM
@ Computes the k-th moment about the mean.
\<< \-> k
\<< \GSDAT OBJ\-> DROP MEAN - k ^ 1 N\GS 1 -
START SWAP MEAN - k ^ +
NEXT N\GS /
\>>
\>>
@ Computes the standard deviation.
Sdev
\<< 2 KMM \v/ \>>
@ Computes the Skewness index.
SKEW
\<< 3 KMM Sdev 3 ^ /
"\Gmc\179=E{X\179}+2\Gm\179-3\GmE{X\178}"
\->TAG
\>>
@ Computes the Curtosi index.
CURT
\<< 4 KMM 2 KMM SQ / \>>
@ For a given class number computes the frequencies for
@ each class boundary. As min value for BINS use MINSigma
@ and as value for boundary range use
@ (MAXSigma-MINSigma)/(Number of class).
NCLASS
\<< \-> CL
\<< MAX\GS MIN\GS - CL / \-> DCL
\<< MIN\GS DCL CL BINS DROP
ARRY\-> DROP { 1 CL } \->ARRY DUP DUP SIZE
N\GS CON ADIVB { \GSPAR } PURGE
\>>
\>>
\>>
@ Divide each element of an array a for each element of a
@ same dimension array b. (Used from NCLASS)
ADIVB
\<< \-> TMP
\<< ARRY\-> LIST\-> DROP \-> I
\<< I
FOR K I ROLL TMP { 1 K } GET /
NEXT { 1 I } \->ARRY
\>>
\>>
\>>
END